<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%> 
<%@ page import="com.lmpop.frame.util.*"%> 

<%
	String configName = "config.properties";
	PropertiesConfigUtil baseConfig = new PropertiesConfigUtil(configName);
	FileUtil fileUtil = new FileUtil();
	Map configMap = fileUtil.getConfigString("WEB-INF/classes/"+configName+"");
	
%>
 

<html>
  <head>
    <title>邮件服务器管理</title>
	<link href="/program/admin/index/css/style.css" rel="stylesheet" type="text/css">
	<script type="text/javascript" src="/js/jquery-1.4.4.min.js"></script>
	<script type="text/javascript" src="mail.js"></script>
</head>

<body>
 
	 
<%
%>
	 
	 
	
	<form action="/doTradeReg.do" method="post" name="addForm">
	
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">
	<%
		Iterator iterator = baseConfig.getKeys();
		while (iterator.hasNext()) {
			String key = (String) iterator.next();
			String value = baseConfig.getProperty(key);
			System.out.println(key);
			
			String remark = "";
			if(configMap != null && configMap.get(key) != null){
				remark = configMap.get(key).toString();
			}
			String inputType = "text";
			String displayType="";
			if(key.equals("rootpath")){
				displayType="none";
			}
			
			if(key.equals("reg_send_mail") || key.equals("is_reg")){
			
			%>
			
		<tr style="display:<%=displayType%>">
			<td align="right" width="20%">
				<%=remark%><font color="red">*</font>
			</td>
			<td>
			是<input name="<%=key%>" id="<%=key%>0" size="40" value="0" <%if(value.equals("0")){%>checked<%}%> type="radio" />&nbsp;
			否<input name="<%=key%>" id="<%=key%>1" size="40" value="1" <%if(value.equals("1")){%>checked<%}%> type="radio" />
			</td>
 
		</tr>			
			
			<%
			
			} else {
			

		
	%>
		<tr style="display:<%=displayType%>">
			<td align="right" width="20%">
				<%=remark%><font color="red">*</font>
			</td>
			<td><input name="<%=key%>" id="<%=key%>" size="40" value="<%=value%>" type="text" /></td>
 
		</tr>

	<%
				}
		}
	%>

	</table>
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="hidden" name="bpm_id" value="5312" />
				<input type="hidden" name="config_name" value="<%=configName%>" />
				<input type="submit" class="buttoncss" name="tradeSub" onclick="" value="提交" />&nbsp;&nbsp;
				
			</td>
		</tr>
	</table>
	
	
	<table width="100%" cellpadding="0" cellspacing="1" border="0" class="listtab">
		<tr>
			<td align="right" width="20%">
				邮箱地址:
			</td>		
			<td>
			<input type="text" maxlength="20" name="email_address" id="email_address"/>
			</td>
		</tr>

		<tr>
			<td align="right" width="20%">
				测试内容:
			</td>		
			<td>
			<textarea name="email_content" id="email_content" cols="30" rows="5"></textarea>
			</td>
		</tr>
	</table>	
	
	<table width="100%" cellpadding="0" cellspacing="0" border="0">
		<tr>
			<td align="center">
				<input type="button" class="buttoncss" name="ceshi" onclick="testEmail();" value="测试邮箱" />
			</td>
		</tr>
	</table>	
	</form>
</body>

</html>
